<template>
  <div>
    <VirtualScroll :data="data" :item-height="80"   :item-count="1000" />
  </div>
</template>

<script setup lang="ts">
import VirtualScroll from '@/components/VirtualScroll/index.vue'
import { ref, onMounted } from 'vue'

const data = ref<{ id: number; name: string; content: string }[]>([])

onMounted(() => {
// 生成模拟数据
data.value = Array.from({ length: 1000 }, (_, index) => ({
  id: index + 1,
  name: `项目 ${index + 1}`,
  content: `这是第 ${index + 1} 个项目的详细内容`
}))
})
</script>

<style lang="scss" scoped></style>
